<!doctype html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" th:href="@{/adminLTE/bower_components/bootstrap/dist/css/bootstrap.min.css}">
    <!-- Font Awesome -->
    <link rel="stylesheet" th:href="@{/adminLTE/bower_components/font-awesome/css/font-awesome.min.css}">
    <!-- Ionicons -->
    <link rel="stylesheet" th:href="@{/adminLTE/bower_components/Ionicons/css/ionicons.min.css}">
    <!-- Theme style -->
    <link rel="stylesheet" th:href="@{/adminLTE/dist/css/AdminLTE.min.css}">
    <!-- AdminLTE Skins. We have chosen the skin-blue for this starter
          page. However, you can choose any other skin. Make sure you
          apply the skin class to the body tag so the changes take effect. -->
    <link rel="stylesheet" th:href="@{/adminLTE/dist/css/skins/_all-skins.min.css}">
    <link rel="stylesheet" th:href="@{/adminLTE/plugins/iCheck/flat/blue.css}">
    <link rel="stylesheet" th:href="@{/bootstrap-table/bootstrap-table.css}">
    <title>标椎地名地址管理系统</title>
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">

    <div th:replace="/common/header :: header"></div>

    <!-- Left side column. contains the logo and sidebar -->
    <div th:replace="/common/user_menu :: user_menu"></div>

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">

            <ol class="breadcrumb">
                <li><a href="#"><i class="fa fa-dashboard"></i>设置</a></li>
                <li class="active">个人资料</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content container-fluid  ">
            <div class="row">

                <div class="col-md-3  ">

                    <!-- Profile Image -->
                    <div class="box box-primary ">
                        <div class="box-body box-profile ">
                            <img class="profile-user-img img-responsive img-circle" th:src="@{/adminLTE/img/头像.jpg}" alt="User profile picture">



                            <p class="text-muted text-center">基本信息</p>
                            <input type="hidden" th:value="${user.userId}" id="userId">

                            <ul class="list-group list-group-unbordered">
                                <li class="list-group-item">
                                    <b>用户名</b> <a class="pull-right"><span class="hidden-xs" th:text="${user.userName}"></span></a>
                                </li>
                                <li class="list-group-item">
                                    <b>邮箱</b> <a class="pull-right"><span class="hidden-xs" th:text="${user.email}"></span></a>
                                </li>

                            </ul>

                        </div>
                        <!-- /.box-header -->
                        <div class="box-body">
                            <a href="#" onclick="edit()" class="btn btn-primary btn-block"><b>修改资料</b></a>
                        </div>
                        <!-- /.box-body -->
                    </div>

                </div>

            </div>

        </section>
    </div>

</div>
<!-- ./wrapper -->

<!-- REQUIRED JS SCRIPTS -->

<!-- jQuery 3 -->
<script th:src="@{/adminLTE/bower_components/jquery/dist/jquery.min.js}"></script>
<!-- Bootstrap 3.3.7 -->
<script th:src="@{/adminLTE/bower_components/bootstrap/dist/js/bootstrap.min.js}"></script>
<!-- AdminLTE App -->
<script th:src="@{/adminLTE/dist/js/adminlte.min.js}"></script>

<script th:src="@{/layer/layer.js}"></script>

<script th:src="@{/bootstrap-table/bootstrap-table.min.js}"></script>
<script th:src="@{/bootstrap-table/locale/bootstrap-table-zh-CN.js}"></script>

<script>
    var id = $("#userId").val();
    function edit(){
        layer.open({
            type: 2,  //打开一个iframe
            title: '编辑',
            content: '/user/form?id=' + id,
            maxmin: true,
            area: ['500px', '300px'],
            btn: ['确定', '取消'],
            yes: function(index, layero){
                // 点击确认触发 iframe 内容中的按钮提交
                var submit = layero.find('iframe').contents().find("#lay-form-submit");
                submit.click();
            }
        });
    }

    function format2Date(date, fmt) {
        var o = {
            "M+": date.getMonth() + 1, // 月份
            "d+": date.getDate(), // 日
            "h+": date.getHours(), // 小时
            "m+": date.getMinutes(), // 分
            "s+": date.getSeconds(), // 秒
            "q+": Math.floor((date.getMonth() + 3) / 3), // 季度
            "S": date.getMilliseconds() // 毫秒
        };
        if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
        for (var k in o)
            if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
        return fmt;
    }

</script>

</body>


</html>